<HTML>
<!--This file created 14/3/01 8:53 AM by Claris Home Page version 3.0-->
<HEAD>
   <TITLE>Batch Architect: Design of Batch Templates</TITLE>
   <META NAME=GENERATOR CONTENT="Claris Home Page 3.0">
   <X-CLARIS-WINDOW TOP=42 BOTTOM=757 LEFT=4 RIGHT=534>
   <X-CLARIS-TAGVIEW MODE=minimal>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</HEAD>
<BODY bgcolor="#FFFFCC">
<H2><TABLE BORDER=0 CELLPADDING=4>
   <TR>
      <TD> <P><img src="splash.gif" width="164" height="64"></P>
      </TD>
      <TD>
         <H2>Batch Architect: Design of Batch Templates</H2>
      </TD>
   </TR>
</TABLE>
</H2>

<p><a href="index.html">Return to Batch Architect Page</a></p>
<H4>David Maddison &amp; Wayne Maddison</H4>

<P>The Template Editor for editing Batch File templates appears as follows:</P>
<P align="center"><img src="batchtemplate.gif" width="348" height="408"></P>
<P>&nbsp;</P>
<P>The text entered into the &quot;Text for start of batch file&quot; field will 
  be written once, at the start of the file; the text in &quot;Repeated text, 
  written for each replicate&quot; will be written as many times as there are 
  replicates; the text in &quot;Text for end of batch file&quot; will be written 
  at the end of the file. The following codes included in these fields will be 
  replaced in the batch file as follows:</P>
<ul>
  <li>&lt;name&gt; will be replaced by the text entered in the &quot;base name&quot; 
    field in the Export Matrices &amp; Batch Files or Export Batch Files dialog 
    boxes.</li>
  <li>&lt;tree&gt; will be replaced by the Newick formatted text description of 
    the tree chosen in the Export Matrices &amp; Batch Files or Export Batch Files 
    dialog boxes.</li>
  <li>&lt;snippet&gt;&lt;/snippet&gt; surrounding the name of a code snippet will 
    be replaced by the text of the code snippet</li>
  <li>&lt;fileExtension&gt; will be replaced by the extension (with dot, if present; 
    e.g., &quot;.nex&quot;, &quot;.ss&quot;) that Mesquite will write based upon 
    the matrix format. </li>
  <li>&lt;matrixFormat&gt; will be replaced by the name of the matrix format (e.g., 
    &quot;NEXUS file&quot;)</li>
  <li>&lt;random&gt; numValues=n lowerBound=b1 upperBound=b2 type=double|long 
    withReplacement=yes|no &lt;/random&gt; will be replaced by n random numbers 
    chosen with a uniform distribution over the range b1 through b2 inclusive, 
    with replacement or not. The numbers are either real numbers (if type=double 
    is chosen) or integers (type=long). For example, &lt;random&gt;numValues=3 
    lowerBound=1 upperBound=100 type=long withReplacement=no&lt;/random&gt; entered 
    in the repeated text field might be replaced by &quot;86 42 23&quot; in one 
    replicate, and &quot;5 73 31&quot; in the next replicate. </li>
</ul>
<P>For the field &quot;Repeated text, written for each replicate&quot;, the following 
  replacement will also be made:</P>
<ul>
  <li>&lt;number&gt; will be replaced by the number of the replicate</li>
</ul>
<P>For example, consider 5 replicates run with a base name of &quot;matrix&quot; 
  for a template with the following specification:</P>
<P align="center"><img src="templateeg.gif" width="445" height="270"></P>
<P>A file called &quot;commands.nex&quot; would be created by Mesquite that would 
  look like this:</P>
<P>&nbsp;</P>
<pre>  #NEXUS
  begin paup;
        set autoclose nowarnreset nowarntree nowarntsave;
        execute 'matrix1.nex';
        hs;
        savetrees file = 'maxtrix1.nex';

        execute 'matrix2.nex';
        hs;
        savetrees file = 'matrix2.nex';

        execute 'matrix3.nex';
        hs;
        savetrees file = 'matrix3.nex';

        execute 'matrix4.nex';
        hs;
        savetrees file = 'matrix4.nex';

        execute 'matrix5.nex';
        hs;
        savetrees file = 'matrix5.nex';
  end;
</pre>
<P>&nbsp;</P>
<P>Up to five separate batch files can be specified for any one Batch File Template.</P>
<p>The &quot;Format of Matrices&quot; choice will be ignored if matrices are not 
  being exported (e.g., if Export Batch Files was chosen).</p>
<p>&nbsp;</p>

<P>

<HR>

</P>

<P>&copy; David Maddison &amp; Wayne Maddison, 2003</P>
</BODY>
</HTML>

